<template>
	<!-- 新增 -->
	<el-dialog
		:title="title"
		:visible.sync="showDialog"
		width="450px">
		<!-- 内容 -->
		<div>
			您确定要提交吗？
		</div>
		
		<!-- 提交 -->
		<span slot="footer" class="dialog-footer">
			<el-button @click="closeDialog()">取 消</el-button>
			<el-button type="primary" @click="closeDialog()">确 定</el-button>
		</span>
	</el-dialog>
</template>

<script>
export default {
	props:["title","show"],
	data() {
		return {
			showDialog:false,
		};
	},
	watch: {
		show:function(val){
			this.showDialog = val;
		},
		showDialog:function(val){
			this.$emit('update:show', val);
		}
	},
	methods:{
		// 关闭弹窗
		closeDialog(){
			this.$emit('update:show', false);
		}
	}
};
</script>

<style lang="scss" scoped>

</style>
